<template>
    <div>
        <h1>展示页面</h1>
        {{form}}
        {{count}}
        <button @click="change">点击</button>
        <van-field label="手机号" placeholder="请输入"></van-field>
        <van-button type="primary">主要按钮</van-button>
    </div>
</template>

<script>
import axios from '../http/axios'
import { reactive, ref } from '@vue/reactivity'
import { onMounted } from '@vue/runtime-core'
    export default {
        setup() {
            let form = reactive({'name':'asd','password':'123'})
            let count = ref(0)
            //点击事件
            const change=()=>{
                form.name='哈哈'
                count.value=12
                axios('/ceshi/','get').then(res=>{
                    console.log(res)
                })
            }

            
            

            //钩子函数
            onMounted(()=>{
                
            })

            //存放所有方法和变量
            return{
                form,
                count,
                change,
                
            }
        }
    }
</script>

<style scoped>

</style>